<template>
	<view>
		<uni-badge text="1" type="info" absolute="rightTop" class="badge-margin">
			<view class="badge-item">
				<text>右上</text>
			</view>
		</uni-badge>
		
		<uni-badge text="1" type="error" absolute="rightTop" class="badge-margin">
			<view class="badge-item">
				<text>右上</text>
			</view>
		</uni-badge>
		
		<uni-badge text="1" type="primary" absolute="rightTop" size="normal" class="badge-margin">
			<view class="badge-item">
				<text>右上</text>
			</view>
		</uni-badge>
		<uni-badge text="1" type="success" inverted absolute="rightTop" size="normal" class="badge-margin">
			<view class="badge-item">
				<text>右上</text>
			</view>
		</uni-badge>
		<!-- 字符串0显示 数字0不显示 -->
		<uni-badge isDot text="0" absolute="rightTop" class="badge-margin">
			<view class="badge-item">
				<text>右上</text>
			</view>
		</uni-badge>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			}
		},
		methods: {
			
		}
	}
</script>

<style>
	.badge-item {
		width: 40px;
		height: 40px;
		display: flex;
		align-items: center;
		justify-content: center;
		background-color: antiquewhite;
		font-size: 28rpx;
	}
	.badge-margin {
		margin-top: 20rpx;
		margin-left: 20rpx;
	}

</style>
